To show one workflow for setting up a Windows pc for compiling OpenCPN.
The pc used was a 'win-32-x86 machine', running Windows 8.1.
If you are running 'x64' you will need to download the 64 bit installers for some of the programs used here. This applies to:
The steps will follow the instructions here.
'Navigate' means using 'Windows Explorer' to find a folder or file.
'cd' or 'CD' is used in a Terminal window to 'change directory' (aka 'change folder')
https://www.visualstudio.com/en-us/news/releasenotes/vs2013-community-vs
Get the Git installation packages from https://git-for-windows.github.io/
Get the latest 'Poedit' installation package from http://www.poedit.net
Note: If you look in the 'C:\Program Files\Poedit\GettextTools\bin' folder you will see the file 'msgfmt.exe' which does the work of the program.
In case you want to create installation packages, install NSIS Unicode 2.46.5 from http://www.scratchpaper.com/
There is a “bug” in CMake, which only looks at “HKEY_LOCAL_MACHINE\SOFTWARE\NSIS” for the installation location of NSIS
The Unicode version adds its registry key in “HKEY_LOCAL_MACHINE\SOFTWARE\NSIS\Unicode”.
Some registry tweaking is needed.
Note: If you are running a 64-bit machine (x64) the key is located in 'HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432node\NSIS\Unicode'
Note: If you are running a 64-bit machine (x64) the location is 'HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432node\NSIS'.
To make the installer package use proper language name translations, it is necessary to modify file 'C:\Program Files\NSIS\Unicode\Contrib\Language files\Norwegian.nsh' and change the line
!insertmacro LANGFILE "Norwegian" "Norwegian"
to
!insertmacro LANGFILE "Norwegian" "Norsk"
The 'C:\Program Files\NSIS\Unicode\Contrib\Language files\Norwegian.nsh' is edited.
Due to 'Security' you will need to add 'Write' permission to this file. Without this you will not be able to save the changes.
Note: This can be confusing!!! Even though we have installed 'Visual Studio Community 2013' when you search the 'Program Files' folder you will see 'Microsoft Visual Studio 12' but not 'Microsoft Visual Studio 13'. When you look at the installed 'Apps' you will see this:
This will open a folder of shortcuts.
You are in the folder 'C:\Program Files\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts'
Note: On a 64 bit machine the prompt is 'VS2013 x64 Command Prompt'
Title is 'VS2013', the text reads 'Visual Studio 12'. You get the picture!!!
An easy way to enter the correct folder (cd) for 'wxWidgets 3.0.2\build\msw' is to navigate to that folder with 'Explorer'.
Build both release and debug configurations, which will be compatible with Windows XP.
RELEASE VERSION nmake -f makefile.vc BUILD=release SHARED=1 CFLAGS=/D_USING_V120_SDK71_ CXXFLAGS=/D_USING_V120_SDK71_ DEBUG VERSION nmake -f makefile.vc BUILD=debug SHARED=1 CFLAGS=/D_USING_V120_SDK71_ CXXFLAGS=/D_USING_V120_SDK71_
You will find that a number of files have been made in the folder 'c:\wxWidgets-3.0.2\lib\vc-dll'.
Some of the filenames start 'wxmsw30u' and others 'wxmsw30ud' corresponding to the 'Release' and 'Debug' versions.
This completes the preparations for building the OpenCPN program.
git clone git://github.com/OpenCPN/OpenCPN.git
Note: If you want the source code for the latest stable release (4.4.0 at time of writing) you need to locate that source on GitHub.com:
https://github.com/OpenCPN/OpenCPN/tree/v4.4.0
Sorry, this needs another program - 7Zip.

'7z' files can now be opened and extracted with this program.

[The command prompt shortcut is in the folder 'C:\Program Files\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts']
mkdir build
cd build cmake -T v120_xp ..
* Close the Terminal window.
* This has created the Visual Studio solution file 'OpenCPN.sln'.
This assumes that you have installed 'NSIS' (The guide was here).
OpenCPN (Version 4.4.0) and the four plugins included in the source files have been built successfully.